HAL CORTEX APIs listing for migration

This section provides a full listing of the HAL1 APIs for migration. It includes the various constants, enumerations, structures, functions, and macros.

HAL CORTEX constants

ARM architecture

HAL1

HAL2

Refer to

Armv8-M, Armv7-M

NVIC_PRIORITYGROUP_0

HAL_CORTEX_NVIC_PRIORITY_GROUP_0

Refer to

Armv8-M, Armv7-M

NVIC_PRIORITYGROUP_1

HAL_CORTEX_NVIC_PRIORITY_GROUP_1

Refer to

Armv8-M, Armv7-M

NVIC_PRIORITYGROUP_2

HAL_CORTEX_NVIC_PRIORITY_GROUP_2

Refer to

Armv8-M, Armv7-M

NVIC_PRIORITYGROUP_3

HAL_CORTEX_NVIC_PRIORITY_GROUP_3

Refer to

Armv8-M, Armv7-M

NVIC_PRIORITYGROUP_4

HAL_CORTEX_NVIC_PRIORITY_GROUP_4

Refer to

Armv8-M, Armv7-M, Armv6-M

SYSTICK_CLKSOURCE_HCLK_DIV8

Removed / New Usage changes

Refer to

Armv8-M

SYSTICK_CLKSOURCE_LSI

Removed / New Usage changes

Refer to

Armv8-M

SYSTICK_CLKSOURCE_LSE

Removed / New Usage changes

Refer to

Armv8-M, Armv7-M, Armv6-M

SYSTICK_CLKSOURCE_HCLK

Removed / New Usage changes

Refer to

Armv8-M, Armv7-M, Armv6-M

MPU_HFNMI_PRIVDEF_NONE

HAL_CORTEX_MPU_ACCESS_FAULT_ALL

Refer to

Armv8-M, Armv7-M, Armv6-M

MPU_HARDFAULT_NMI

HAL_CORTEX_MPU_ACCESS_FAULT_ONLY_PRIV

Refer to

Armv8-M, Armv7-M, Armv6-M

MPU_PRIVILEGED_DEFAULT

HAL_CORTEX_MPU_HARDFAULT_NMI_DISABLE

Refer to

Armv8-M, Armv7-M, Armv6-M

MPU_HFNMI_PRIVDEF

MPU_HFNMI_PRIVDEF

Refer to

Armv8-M, Armv7-M, Armv6-M

MPU_REGION_ENABLE

HAL_CORTEX_MPU_REGION_ENABLED

Refer to

Armv8-M, Armv7-M, Armv6-M

MPU_REGION_DISABLE

HAL_CORTEX_MPU_REGION_DISABLED

Refer to

Armv8-M, Armv7-M, Armv6-M

MPU_INSTRUCTION_ACCESS_ENABLE

HAL_CORTEX_MPU_EXECUTION_ATTR_ENABLE

Refer to

Armv8-M, Armv7-M, Armv6-M

MPU_INSTRUCTION_ACCESS_DISABLE

HAL_CORTEX_MPU_EXECUTION_ATTR_DISABLE

Refer to

Armv8-M

MPU_ACCESS_NOT_SHAREABLE

Removed

Refer to

Armv8-M

MPU_ACCESS_OUTER_SHAREABLE

Removed

Refer to

Armv8-M

MPU_ACCESS_INNER_SHAREABLE

Removed

Refer to

Armv8-M, Armv7-M, Armv6-M

MPU_REGION_PRIV_RW

HAL_CORTEX_MPU_REGION_ONLY_PRIV_RW

Refer to

Armv8-M

MPU_REGION_ALL_RW

HAL_CORTEX_MPU_REGION_ALL_RW

Refer to

Armv8-M, Armv7-M, Armv6-M

MPU_REGION_PRIV_RO

HAL_CORTEX_MPU_REGION_ONLY_PRIV_RO

Refer to

Armv8-M

MPU_REGION_ALL_RO

HAL_CORTEX_MPU_REGION_ALL_RO

Refer to

Armv8-M, Armv7-M, Armv6-M

MPU_REGION_NUMBER0

HAL_CORTEX_MPU_REGION_0

Refer to

Armv8-M, Armv7-M, Armv6-M

MPU_REGION_NUMBER1

HAL_CORTEX_MPU_REGION_1

Refer to

Armv8-M, Armv7-M, Armv6-M

MPU_REGION_NUMBER2

HAL_CORTEX_MPU_REGION_2

Refer to

Armv8-M, Armv7-M, Armv6-M

MPU_REGION_NUMBER3

HAL_CORTEX_MPU_REGION_3

Refer to

Armv8-M, Armv7-M, Armv6-M

MPU_REGION_NUMBER4

HAL_CORTEX_MPU_REGION_4

Refer to

Armv8-M, Armv7-M, Armv6-M

MPU_REGION_NUMBER5

HAL_CORTEX_MPU_REGION_5

Refer to

Armv8-M, Armv7-M, Armv6-M

MPU_REGION_NUMBER6

HAL_CORTEX_MPU_REGION_6

Refer to

Armv8-M, Armv7-M, Armv6-M

MPU_REGION_NUMBER7

HAL_CORTEX_MPU_REGION_7

Refer to

Armv8-M

MPU_ATTRIBUTES_NUMBER0

HAL_CORTEX_MPU_MEM_ATTR_0

Refer to

Armv8-M

MPU_ATTRIBUTES_NUMBER1

HAL_CORTEX_MPU_MEM_ATTR_1

Refer to

Armv8-M

MPU_ATTRIBUTES_NUMBER2

HAL_CORTEX_MPU_MEM_ATTR_2

Refer to

Armv8-M

MPU_ATTRIBUTES_NUMBER3

HAL_CORTEX_MPU_MEM_ATTR_3

Refer to

Armv8-M

MPU_ATTRIBUTES_NUMBER4

HAL_CORTEX_MPU_MEM_ATTR_4

Refer to

Armv8-M

MPU_ATTRIBUTES_NUMBER5

HAL_CORTEX_MPU_MEM_ATTR_5

Refer to

Armv8-M

MPU_ATTRIBUTES_NUMBER6

HAL_CORTEX_MPU_MEM_ATTR_6

Refer to

Armv8-M

MPU_ATTRIBUTES_NUMBER7

HAL_CORTEX_MPU_MEM_ATTR_7

Refer to

Armv8-M(only in U5 series)

MPU_DEVICE_NGNRNE

HAL_CORTEX_MPU_DEVICE_MEM_NGNRNE

Refer to

Armv8-M(only in U5 series)

MPU_DEVICE_NGNRE

HAL_CORTEX_MPU_DEVICE_MEM_NGNRE

Refer to

Armv8-M(only in U5 series)

MPU_DEVICE_NGRE

HAL_CORTEX_MPU_DEVICE_MEM_NGRE

Refer to

Armv8-M

MPU_DEVICE_GRE

HAL_CORTEX_MPU_DEVICE_MEM_GRE

Refer to

Armv8-M

MPU_NOT_CACHEABLE

HAL_CORTEX_MPU_NORMAL_MEM_NCACHEABLE

Refer to

Armv8-M

MPU_WRITE_THROUGH

Combined into predefined options

Refer to

Armv8-M

MPU_WRITE_BACK

Combined into predefined options

Refer to

Armv8-M

MPU_TRANSIENT

Combined into predefined options

Refer to

Armv8-M

MPU_NON_TRANSIENT

Combined into predefined options

Refer to

Armv8-M

MPU_NO_ALLOCATE

Combined into predefined options

Refer to

Armv8-M

MPU_W_ALLOCATE

Combined into predefined options

Refer to

Armv8-M

MPU_R_ALLOCATE

Combined into predefined options

Refer to

Armv8-M

MPU_RW_ALLOCATE

Combined into predefined options

Refer to

Armv7-M (only in H7 series), Armv8-M (only in H5 series)

MPU_REGION_NUMBER8

HAL_CORTEX_MPU_REGION_8

Refer to

Armv7-M (only in H7 series), Armv8-M (only in H5 series)

MPU_REGION_NUMBER9

HAL_CORTEX_MPU_REGION_9

Refer to

Armv7-M (only in H7 series),Armv8-M (only in H5 series)

MPU_REGION_NUMBER10

HAL_CORTEX_MPU_REGION_10

Refer to

Armv7-M (only in H7 series),Armv8-M (only in H5 series)

MPU_REGION_NUMBER11

HAL_CORTEX_MPU_REGION_11

Refer to

Armv8-M (only in H5 series)

MPU_DEVICE_nGnRnE

HAL_CORTEX_MPU_DEVICE_MEM_NGNRNE

Refer to

Armv8-M (only in H5 series)

MPU_DEVICE_nGnRE

HAL_CORTEX_MPU_DEVICE_MEM_NGNRE

Refer to

Armv8-M (only in H5 series)

MPU_DEVICE_nGRE

HAL_CORTEX_MPU_DEVICE_MEM_NGRE

Refer to

Armv7-M, Armv6-M

MPU_ACCESS_SHAREABLE

Combined into predefined options

Refer to

Armv7-M, Armv6-M

MPU_ACCESS_NOT_SHAREABLE

Combined into predefined options

Refer to

Armv7-M, Armv6-M

MPU_ACCESS_CACHEABLE

Combined into predefined options

Refer to

Armv7-M, Armv6-M

MPU_ACCESS_NOT_CACHEABLE

Combined into predefined options

Refer to

Armv7-M, Armv6-M

MPU_ACCESS_BUFFERABLE

Combined into predefined options

Refer to

Armv7-M, Armv6-M

MPU_ACCESS_NOT_BUFFERABLE

Combined into predefined options

Refer to

Armv7-M, Armv6-M

MPU_TEX_LEVEL0

Combined into predefined options

Refer to

Armv7-M, Armv6-M

MPU_TEX_LEVEL1

Combined into predefined options

Refer to

Armv7-M, Armv6-M

MPU_TEX_LEVEL2

Combined into predefined options

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_256B

HAL_CORTEX_MPU_REGION_SIZE_256B

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_512B

HAL_CORTEX_MPU_REGION_SIZE_512B

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_1KB

HAL_CORTEX_MPU_REGION_SIZE_1KB

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_2KB

HAL_CORTEX_MPU_REGION_SIZE_2KB

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_4KB

HAL_CORTEX_MPU_REGION_SIZE_4KB

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_8KB

HAL_CORTEX_MPU_REGION_SIZE_8KB

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_16KB

HAL_CORTEX_MPU_REGION_SIZE_16KB

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_32KB

HAL_CORTEX_MPU_REGION_SIZE_32KB

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_64KB

HAL_CORTEX_MPU_REGION_SIZE_64KB

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_128KB

HAL_CORTEX_MPU_REGION_SIZE_128KB

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_256KB

HAL_CORTEX_MPU_REGION_SIZE_256KB

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_512KB

HAL_CORTEX_MPU_REGION_SIZE_512KB

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_1MB

HAL_CORTEX_MPU_REGION_SIZE_1MB

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_2MB

HAL_CORTEX_MPU_REGION_SIZE_2MB

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_4MB

HAL_CORTEX_MPU_REGION_SIZE_4MB

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_8MB

HAL_CORTEX_MPU_REGION_SIZE_8MB

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_16MB

HAL_CORTEX_MPU_REGION_SIZE_16MB

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_32MB

HAL_CORTEX_MPU_REGION_SIZE_32MB

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_64MB

HAL_CORTEX_MPU_REGION_SIZE_64MB

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_128MB

HAL_CORTEX_MPU_REGION_SIZE_128MB

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_256MB

HAL_CORTEX_MPU_REGION_SIZE_256MB

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_512MB

HAL_CORTEX_MPU_REGION_SIZE_512MB

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_1GB

HAL_CORTEX_MPU_REGION_SIZE_1GB

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_2GB

HAL_CORTEX_MPU_REGION_SIZE_2GB

Refer to

Armv7-M, Armv6-M

MPU_REGION_SIZE_4GB

HAL_CORTEX_MPU_REGION_SIZE_4GB

Refer to

Armv7-M, Armv6-M

MPU_REGION_NO_ACCESS

HAL_CORTEX_MPU_REGION_ALL_RW_FAULT

Refer to

Armv7-M, Armv6-M

MPU_REGION_PRIV_RW_URO

HAL_CORTEX_MPU_REGION_NPRIV_W_FAULT

Refer to

Armv7-M, Armv6-M

MPU_REGION_FULL_ACCESS

HAL_CORTEX_MPU_REGION_ALL_RW

Refer to

Armv7-M, Armv6-M

MPU_REGION_PRIV_RO_URO

HAL_CORTEX_MPU_REGION_ALL_RO

Refer to

Armv7-M (only in L4, G4 series)

MPU_TEX_LEVEL4

Combined into predefined options

Refer to

Armv7-M (only in L4, G4 series)

MPU_REGION_SIZE_32B

HAL_CORTEX_MPU_REGION_SIZE_32B

Refer to

Armv7-M (only in L4, G4 series)

MPU_REGION_SIZE_64B

HAL_CORTEX_MPU_REGION_SIZE_64B

Refer to

Armv7-M (only in L4, G4 series)

MPU_REGION_SIZE_128B

HAL_CORTEX_MPU_REGION_SIZE_128B

Refer to

Armv7-M (only in H7 series with dual core)

CM4_CPUID

Not implemented yet in HAL2.

Refer to

Armv7-M (only in H7 series with dual core)

CM7_CPUID

Not implemented yet in HAL2.

Refer to

Armv7-M (only in H7 series)

MPU_REGION_NUMBER12

HAL_CORTEX_MPU_REGION_12

Refer to

Armv7-M (only in H7 series)

MPU_REGION_NUMBER13

HAL_CORTEX_MPU_REGION_13

Refer to

Armv7-M (only in H7 series)

MPU_REGION_NUMBER14

HAL_CORTEX_MPU_REGION_14

Refer to

Armv7-M (only in H7 series)

MPU_REGION_NUMBER15

HAL_CORTEX_MPU_REGION_15

Refer to


HAL CORTEX macros

ARM architecture

HAL1

HAL2

series

Refer to

Armv8-M

OUTER

u5, h5

Refer to

Armv8-M

INNER_OUTER

u5, h5

Refer to


HAL CORTEX structures

ARM architecture

HAL1

HAL2

Refer to

Armv8-M, Armv7-M, Armv6-M

MPU_Region_InitTypeDef

hal_cortex_mpu_region_config_t

Refer to

Armv8-M

MPU_Attributes_InitTypeDef

Replaced with Enumerations (hal_cortex_mpu_region_idx_t + hal_cortex_mpu_mem_attr_idx_t)

Refer to


HAL CORTEX functions

ARM architecture

HAL1

HAL2

Refer to

Armv8-M, Armv7-M

HAL_NVIC_SetPriorityGrouping

HAL_CORTEX_NVIC_SetPriorityGrouping

Refer to

Armv8-M, Armv7-M, Armv6-M

HAL_NVIC_SetPriority

HAL_CORTEX_NVIC_SetPriority

Refer to

Armv8-M, Armv7-M, Armv6-M

HAL_NVIC_EnableIRQ

HAL_CORTEX_NVIC_EnableIRQ

Refer to

Armv8-M, Armv7-M, Armv6-M

HAL_NVIC_DisableIRQ

HAL_CORTEX_NVIC_DisableIRQ

Refer to

Armv8-M, Armv7-M, Armv6-M

HAL_NVIC_SystemReset

HAL_CORTEX_NVIC_SystemReset

Refer to

Armv8-M, Armv7-M, Armv6-M

HAL_SYSTICK_Config

HAL_CORTEX_SYSTICK_SetFreq

Refer to

Armv8-M, Armv7-M

HAL_NVIC_GetPriorityGrouping

HAL_CORTEX_NVIC_GetPriorityGrouping

Refer to

Armv8-M, Armv7-M, Armv6-M

HAL_NVIC_GetPriority

HAL_CORTEX_NVIC_GetPriority

Refer to

Armv8-M, Armv7-M, Armv6-M

HAL_NVIC_GetPendingIRQ

HAL_CORTEX_NVIC_IsPendingIRQ

Refer to

Armv8-M, Armv7-M, Armv6-M

HAL_NVIC_SetPendingIRQ

HAL_CORTEX_NVIC_SetPendingIRQ

Refer to

Armv8-M, Armv7-M, Armv6-M

HAL_NVIC_ClearPendingIRQ

HAL_CORTEX_NVIC_ClearPendingIRQ

Refer to

Armv8-M, Armv7-M

HAL_NVIC_GetActive

HAL_CORTEX_NVIC_IsActiveIRQ

Refer to

Armv8-M, Armv7-M, Armv6-M

HAL_SYSTICK_CLKSourceConfig

HAL_CORTEX_SYSTICK_SetClkSource

Refer to

Armv8-M

HAL_SYSTICK_GetCLKSourceConfig

Removed

Refer to

Armv8-M, Armv7-M, Armv6-M

HAL_SYSTICK_IRQHandler

HAL_CORTEX_SYSTICK_IRQHandler

Refer to

Armv8-M, Armv7-M, Armv6-M

HAL_SYSTICK_Callback

HAL_CORTEX_SYSTICK_Callback

Refer to

Armv8-M, Armv7-M, Armv6-M

HAL_MPU_Enable

HAL_CORTEX_MPU_Enable

Refer to

Armv8-M, Armv7-M, Armv6-M

HAL_MPU_Disable

HAL_CORTEX_MPU_Disable

Refer to

Armv8-M, Armv7-M, Armv6-M

HAL_MPU_EnableRegion

HAL_CORTEX_MPU_EnableRegion

Refer to

Armv8-M, Armv7-M, Armv6-M

HAL_MPU_DisableRegion

HAL_CORTEX_MPU_DisableRegion

Refer to

Armv8-M, Armv7-M, Armv6-M

HAL_MPU_ConfigRegion

HAL_CORTEX_MPU_SetConfigRegion

Refer to

Armv8-M

HAL_MPU_ConfigMemoryAttributes

HAL_CORTEX_MPU_SetDeviceMemAttr / HAL_CORTEX_MPU_SetCacheMemAttr

Refer to

Armv8-M

HAL_MPU_Enable_NS

HAL_CORTEX_MPUNS_Enable

Refer to

Armv8-M

HAL_MPU_Disable_NS

HAL_CORTEX_MPUNS_Disable

Refer to

Armv8-M

HAL_MPU_EnableRegion_NS

HAL_CORTEX_MPUNS_EnableRegion

Refer to

Armv8-M

HAL_MPU_DisableRegion_NS

HAL_CORTEX_MPUNS_DisableRegion

Refer to

Armv8-M

HAL_MPU_ConfigRegion_NS

HAL_CORTEX_MPUNS_SetConfigRegion

Refer to

Armv8-M

HAL_MPU_ConfigMemoryAttributes_NS

HAL_CORTEX_MPUNS_SetDeviceMemAttr / HAL_CORTEX_MPUNS_SetCacheMemAttr

Refer to

Armv7-M (only in F4 series)

HAL_CORTEX_ClearEvent

Not implemented yet in HAL2.

Refer to

Armv7-M (only in H7 series)

HAL_GetCurrentCPUID

Not implemented yet in HAL2.

Refer to


HAL CORTEX legacy aliases (HAL1 to HAL1)

Note

This table provides a list of HAL1 to HAL1 legacy aliases defined in the stm32_hal_legacy.h HAL1 header file. To migrate the aliased HAL1 APIs, search for them in the HAL1 to HAL2 sections: HAL CORTEX constants, HAL CORTEX functions.

HAL1 legacy API alias

HAL1 API

__HAL_CORTEX_SYSTICKCLK_CONFIG

HAL_SYSTICK_CLKSourceConfig

MPU_DEVICE_nGnRnE

MPU_DEVICE_NGNRNE

MPU_DEVICE_nGnRE

MPU_DEVICE_NGNRE

MPU_DEVICE_nGRE

MPU_DEVICE_NGRE